<template>
  <div class="common-form-item">
    <div class="left">
        <span>{{props.title}}</span><span style="color: red">{{props.sub}}</span>
    </div>
    <div class="right" v-if="$slots.right">
        <slot name="right" />
    </div>
    <div class="right-text" v-if="$slots.rightText">
        <slot name="rightText" />
    </div>
    <div class="right-full" v-if="$slots.rightFull">
        <slot name="rightFull" />
    </div>
  </div>
</template>

<script lang="ts" setup="context">
import { defineProps } from 'vue'

const props = defineProps<{
  title: string
  sub:string
}>()

</script>


<style scoped lang="scss">
.common-form-item {
    display: flex;
    align-items: center;
    .left {
        width: 70px;
        padding-right: 12px;
        min-height: 7px;
        margin-top: -5px;
        text-align: right;
        color: rgba(240, 245, 255, 0.95);
    }
    .right {
        width: 212px;
        height: 40px;
    }
    .right-text {
        padding-left: 16px;
        min-height: 7px;
        margin-top: -5px;
        width: 212px;
        color: rgba(240, 245, 255, 0.95);
    }
    .right-full {
       padding-left: 10px;
    }
}
</style>

<style lang="scss">
.common-form-item {
  .el-select, .el-date-editor.el-input {
    width: 100%;
  }
  .el-select, .el-input__inner{
    color: #e9e9e9;
  }
}
</style>
